{% extends 'Layout.html' %}
{% block content %}
    <div class="container">
        <div style="margin-bottom:10px" class="clearfix">
            <a class="btn btn-success" href="/phonenum/add/">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
            新建靓号</a>
            <div style="float:right;width:300px;">
                <form method="get">
            <div class="input-group" >

            <input type="text" class="form-control" placeholder="Search for..." name="q" value="{{ search_data }}">
            <span class="input-group-btn">
            <button class="btn btn-default" type="submit">
                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
            </button>
            </span>

            </div><!-- /input-group -->
                    </form>
            </div>
        <div class="panel panel-default">

            <div class="panel-heading">
                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                靓号列表
            </div>
            <div class="panel-body">
    Panel content
            <table class="table table-bordered" >
        <thead>
          <tr>
            <th>ID</th>
            <th>电话号码</th>
            <th>等级</th>
            <th>状态</th>
            <th>价格</th>
          </tr>
        </thead>
        <tbody>
        {% for item in phonelist %}
          <tr>
            <th scope="row">{{ item.id }}</th>
            <td>{{ item.mobilenumber }}</td>
            <td>{{ item.get_level_display}}</td>
            <td>{{ item.get_status_display }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.address }}</td>
            <td>
                <a class="btn btn-primary btn-xs" href="/phonenum/{{ item.id }}/edit/">编辑</a>
                <a class="btn btn-danger btn-xs" href="/phonenum/{{ item.id }}/del/">删除</a>
            </td>
          </tr>
        {% endfor %}

        </tbody>
      </table>
  </div>
</div>

    </div><nav aria-label="Page navigation">
  <ul class="pagination" style="float:left;">
    <li>
{#      <a href="#" aria-label="Previous">#}
{#        <span aria-hidden="true">&laquo;</span>#}
{#      </a>#}
    </li>
      {{ page_string }}
{#    <li><a href="?page=1">1</a></li>#}
{#    <li><a href="?page=2">2</a></li>#}
{#    <li><a href="?page=3">3</a></li>#}
{#    <li><a href="?page=4">4</a></li>#}
{#    <li><a href="?page=5">5</a></li>#}

    <li>
{#      <a href="#" aria-label="Next">#}
{#        <span aria-hidden="true">&raquo;</span>#}
{#      </a>#}
    </li>
  </ul>
</nav>


    </div>
{% endblock %}